<?php

/**
 * agenda actions.
 *
 * @package    gestdent
 * @subpackage agenda
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 12479 2008-10-31 10:54:40Z fabien $
 */
class agendaActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */

  public function executeIndex(sfWebRequest $request)
  {

      //FORMULARIO DE SELECCION DE SUCURSAL
      $this->formularioSeleccionSucursales = new GestdentSucursalFormCustom();

      //LISTADO DE HORAS
      $this->gestdent_hora_list = GestdentHoraPeer::doSelect(new Criteria());

      //QUERY PARA LISTADO DE BOX
      //$MyCriterioBox = new Criteria();
      //$MyCriterioBox->add(GestdentBoxPeer::SUCURSAL,1);
      //$this->gestdent_box_list = GestdentBoxPeer::doSelect($MyCriterioBox);

      //OBTINE LISTADO DE BOX'S DE LA SUCURSAL
      $this->gestdent_box_list = GestdentBoxPeer::filtrarxsucursal($request->getParameter('sucursal_id'));


      //OBTIENE TODOS LOS HORARIOS
      //$this->gestdent_horario3_list = GestdentHorario3Peer::filtrarxdia(1,1);
      $this->gestdent_horario3_list = GestdentHorario3Peer::filtrarxdia($request->getParameter('sucursal_id'),1);

  }
}
